package com.filter;

import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

public class SessionListener implements HttpSessionListener {

	public static int counter;
	@Override
	public void sessionCreated(HttpSessionEvent paramHttpSessionEvent) {
		counter++;
System.out.println("Total no of user logged in "+counter);		
	}

	@Override
	public void sessionDestroyed(HttpSessionEvent paramHttpSessionEvent) {
		  counter--;
		  System.out.println("session destroyed "+counter);
	}

}
